package top.mypath.model.vo;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.beans.PropertyChangeListener;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author LiYalin
 */
public class ActionImpl implements Action {

    private Map<String,Object> attribute;

    private boolean enabled;

    public ActionImpl() {
        attribute=new ConcurrentHashMap<>();
        enabled=true;
    }

    @Override
    public Object getValue(String key) {
        return attribute.get(key);
    }

    @Override
    public void putValue(String key, Object value) {
        attribute.put(key, value);
    }

    @Override
    public void setEnabled(boolean b) {
        enabled=b;
    }

    @Override
    public boolean isEnabled() {
        return enabled;
    }

    @Override
    public void addPropertyChangeListener(PropertyChangeListener listener) {

    }

    @Override
    public void removePropertyChangeListener(PropertyChangeListener listener) {

    }

    @Override
    public void actionPerformed(ActionEvent e) {

    }
}
